<template>
  <router-link :to="to" :tag="tag" :exact="exact" active-class="activeClass">
      <slot></slot>
  </router-link>
</template>
<script>
import router from "./../router/index";
export default {
    props:{
        to:{
            type:String,
            default:'/'
        },
        tag:{
            type:String,
            default:'a'
        },
        exact:{
            type:Boolean,
            default:false
        },
        activeClass:{
            type:String,
            default:'active'
        }
    },
    mounted(){
        router.beforeEach((to, from, next) => {
            next()
        })
    }
}
</script>

